import Home from '../components/Home.vue'
import Layout from '../components/Layout'
import Users from '../views/Users'
import User from '../components/User'
import Profile from '../components/Profile'
import Password from '../components/Password'
import Avatar from '../components/Avatar'
import Role from '../components/Role'
import UserRole from '../components/UserRole'
import Login from '../views/Login'


let routes = [
  {
    path: '/',
    component: Layout,
    meta:{
      title:'根',
      icon:'el-icon-s-promotion'
    },
    children: [
      {
        path: 'home',
        name: 'home',
        component: Home,
        meta:{
          title: '首页',
          icon: 'el-icon-house'
        },
      },
      {
        path: 'user',
        name: 'user',
        component: User,
        meta:{
        title: '仪表盘',          
        icon: 'el-icon-user-solid'
        }
      },
    ],
  },
  {
    path: '/system',
    name: 'system',
    component: Layout,
    meta: {
      title: "系统设置",
      icon: 'el-icon-s-tools'
    },

    children: [
      {
        path: 'users',
        name: 'users',
        component: Users,
        meta: {
          title: '用户设置',
          icon: 'el-icon-s-check'
        },
        children: [
          {
            path: 'profile',
            component: Profile,
            meta: {
              title: '用户信息',
              icon: 'el-icon-postcard'
            },
          },
          {
            path: 'password',
            component: Password,
            meta: {
              title: '修改密码',
              icon: 'el-icon-unlock'
            },
          },
          {
            path: 'avatar',

              component: Avatar,            
            meta: {
            title: '上传头像',
              icon: 'el-icon-camera-solid'
            },
          },
        ],
      },
      {
        path: 'role',
        component: Role,
        meta: {
          title: '角色设置',
          icon:'el-icon-mouse'
        }
      },
      {
        path: 'userRole',
        component: UserRole,
        meta: {
          title: '用户角色',
          icon: 'el-icon-view '
        }
      }
    ],
  },
  {
    path:'/login',
    component: Login,
    meta:{
      title:'登录',
      icon:'el-icon-view',
      hidden:true
    }
  }
]

export default routes